package com.rcloud.server.sealtalk.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 用户朋友圈表信息
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "user_wechat_moments")
public class UserWechatMoments {
    /**
     * 主键ID
     */
    @Id
    @Column(name = "id")
    private Integer id;

    /**
     * 朋友圈内容
     */
    @Column(name = "content")
    private String content;

    /**
     * 朋友圈图片
     */
    @Column(name = "image_url")
    private String imageUrl;

    /**
     * 图片或者视频缩略图
     */
    @ApiModelProperty(value = "图片或者视频缩略图")
    private String thumbnail;

    /**
     * 用户id
     */
    @Column(name = "user_id")
    private String userId;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    @Column(name = "create_time")
    private Date createTime;
    /**
     * 发布人用户昵称
     */
    @Transient
    private String userNickname;
    /**
     * 发布人用户头像
     */
    @Transient
    private String userAvatar;
}